Integrand size = 23, antiderivative size = 74 \[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{\sqrt {a} f}+\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b} f} \]
-arctanh((a+b*tan(f*x+e)^2)^(1/2)/a^(1/2))/f/a^(1/2)+arctanh((a+b*tan(f*x+ e)^2)^(1/2)/(a-b)^(1/2))/f/(a-b)^(1/2)
Time = 0.10 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.97 \[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\frac {-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}}{f} \]
(-(ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a]]/Sqrt[a]) + ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a - b]]/Sqrt[a - b])/f
Time = 0.29 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.03, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 4153, 354, 97, 73, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x) \sqrt {a+b \tan (e+f x)^2}}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle \frac {\int \frac {\cot (e+f x)}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle \frac {\int \frac {\cot (e+f x)}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 97 |
\(\displaystyle \frac {\int \frac {\cot (e+f x)}{\sqrt {b \tan ^2(e+f x)+a}}d\tan ^2(e+f x)-\int \frac {1}{\left (\tan ^2(e+f x)+1\right ) \sqrt {b \tan ^2(e+f x)+a}}d\tan ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {\frac {2 \int \frac {1}{\frac {\tan ^4(e+f x)}{b}-\frac {a}{b}}d\sqrt {b \tan ^2(e+f x)+a}}{b}-\frac {2 \int \frac {1}{\frac {\tan ^4(e+f x)}{b}-\frac {a}{b}+1}d\sqrt {b \tan ^2(e+f x)+a}}{b}}{2 f}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{\sqrt {a-b}}-\frac {2 \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a}}\right )}{\sqrt {a}}}{2 f}\) |
((-2*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a]])/Sqrt[a] + (2*ArcTanh[Sqr t[a + b*Tan[e + f*x]^2]/Sqrt[a - b]])/Sqrt[a - b])/(2*f)
3.4.23.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Simp[b/(b*c - a*d) Int[(e + f*x)^p/(a + b*x), x], x] - Simp[d/(b*c - a*d) Int[(e + f*x)^p/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && !IntegerQ[p]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Leaf count of result is larger than twice the leaf count of optimal. \(451\) vs. \(2(62)=124\).
Time = 1.03 (sec) , antiderivative size = 452, normalized size of antiderivative = 6.11
method | result | size |
default | \(\frac {\left (2 \ln \left (4 \cos \left (f x +e \right ) \sqrt {a -b}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}+4 \cos \left (f x +e \right ) a -4 b \cos \left (f x +e \right )+4 \sqrt {a -b}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\right ) \sqrt {a}+\ln \left (\frac {2 \cos \left (f x +e \right ) \sqrt {a}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}+2 \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}-2 \cos \left (f x +e \right ) a +2 b \cos \left (f x +e \right )+2 b}{\sqrt {a}\, \left (\cos \left (f x +e \right )+1\right )}\right ) \sqrt {a -b}-\ln \left (-\frac {4 \left (\cos \left (f x +e \right ) \sqrt {a}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}+\cos \left (f x +e \right ) a -b \cos \left (f x +e \right )+\sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \sqrt {a}+b \right )}{\cos \left (f x +e \right )-1}\right ) \sqrt {a -b}\right ) \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\sec \left (f x +e \right )+1\right )}{2 f \sqrt {a}\, \sqrt {a -b}\, \sqrt {a +b \tan \left (f x +e \right )^{2}}}\) | \(452\) |
1/2/f/a^(1/2)/(a-b)^(1/2)*(2*ln(4*cos(f*x+e)*(a-b)^(1/2)*((a*cos(f*x+e)^2- b*cos(f*x+e)^2+b)/(cos(f*x+e)+1)^2)^(1/2)+4*cos(f*x+e)*a-4*b*cos(f*x+e)+4* (a-b)^(1/2)*((a*cos(f*x+e)^2-b*cos(f*x+e)^2+b)/(cos(f*x+e)+1)^2)^(1/2))*a^ (1/2)+ln(2/a^(1/2)*(cos(f*x+e)*a^(1/2)*((a*cos(f*x+e)^2-b*cos(f*x+e)^2+b)/ (cos(f*x+e)+1)^2)^(1/2)+((a*cos(f*x+e)^2-b*cos(f*x+e)^2+b)/(cos(f*x+e)+1)^ 2)^(1/2)*a^(1/2)-cos(f*x+e)*a+b*cos(f*x+e)+b)/(cos(f*x+e)+1))*(a-b)^(1/2)- ln(-4*(cos(f*x+e)*a^(1/2)*((a*cos(f*x+e)^2-b*cos(f*x+e)^2+b)/(cos(f*x+e)+1 )^2)^(1/2)+cos(f*x+e)*a-b*cos(f*x+e)+((a*cos(f*x+e)^2-b*cos(f*x+e)^2+b)/(c os(f*x+e)+1)^2)^(1/2)*a^(1/2)+b)/(cos(f*x+e)-1))*(a-b)^(1/2))*((a*cos(f*x+ e)^2-b*cos(f*x+e)^2+b)/(cos(f*x+e)+1)^2)^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*(s ec(f*x+e)+1)
Time = 0.28 (sec) , antiderivative size = 446, normalized size of antiderivative = 6.03 \[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\left [\frac {\sqrt {a - b} a \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right ) + {\left (a - b\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right )}{2 \, {\left (a^{2} - a b\right )} f}, \frac {2 \, a \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right ) + {\left (a - b\right )} \sqrt {a} \log \left (\frac {b \tan \left (f x + e\right )^{2} - 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a} + 2 \, a}{\tan \left (f x + e\right )^{2}}\right )}{2 \, {\left (a^{2} - a b\right )} f}, \frac {2 \, \sqrt {-a} {\left (a - b\right )} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) + \sqrt {a - b} a \log \left (\frac {b \tan \left (f x + e\right )^{2} + 2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 2 \, a - b}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, {\left (a^{2} - a b\right )} f}, \frac {\sqrt {-a} {\left (a - b\right )} \arctan \left (\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a}}{a}\right ) + a \sqrt {-a + b} \arctan \left (-\frac {\sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{a - b}\right )}{{\left (a^{2} - a b\right )} f}\right ] \]
[1/2*(sqrt(a - b)*a*log((b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*s qrt(a - b) + 2*a - b)/(tan(f*x + e)^2 + 1)) + (a - b)*sqrt(a)*log((b*tan(f *x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(a) + 2*a)/tan(f*x + e)^2))/( (a^2 - a*b)*f), 1/2*(2*a*sqrt(-a + b)*arctan(-sqrt(b*tan(f*x + e)^2 + a)*s qrt(-a + b)/(a - b)) + (a - b)*sqrt(a)*log((b*tan(f*x + e)^2 - 2*sqrt(b*ta n(f*x + e)^2 + a)*sqrt(a) + 2*a)/tan(f*x + e)^2))/((a^2 - a*b)*f), 1/2*(2* sqrt(-a)*(a - b)*arctan(sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a)/a) + sqrt(a - b)*a*log((b*tan(f*x + e)^2 + 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(a - b) + 2* a - b)/(tan(f*x + e)^2 + 1)))/((a^2 - a*b)*f), (sqrt(-a)*(a - b)*arctan(sq rt(b*tan(f*x + e)^2 + a)*sqrt(-a)/a) + a*sqrt(-a + b)*arctan(-sqrt(b*tan(f *x + e)^2 + a)*sqrt(-a + b)/(a - b)))/((a^2 - a*b)*f)]
\[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int \frac {\cot {\left (e + f x \right )}}{\sqrt {a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \]
\[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
\[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=\int { \frac {\cot \left (f x + e\right )}{\sqrt {b \tan \left (f x + e\right )^{2} + a}} \,d x } \]
Time = 11.66 (sec) , antiderivative size = 232, normalized size of antiderivative = 3.14 \[ \int \frac {\cot (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}} \, dx=-\frac {\mathrm {atanh}\left (\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{\sqrt {a}}\right )}{\sqrt {a}\,f}-\frac {\mathrm {atanh}\left (\frac {4\,a\,b^2\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{\left (\frac {2\,b^4\,f^3}{a\,f^3-b\,f^3}-\frac {2\,a\,b^3\,f^3}{a\,f^3-b\,f^3}\right )\,\sqrt {a-b}}-\frac {2\,b^3\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}}{\left (\frac {2\,b^4\,f^3}{a\,f^3-b\,f^3}-\frac {2\,a\,b^3\,f^3}{a\,f^3-b\,f^3}\right )\,\sqrt {a-b}}+\frac {2\,\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (a\,f^3-b\,f^3\right )}{b\,f^3\,\sqrt {a-b}}\right )}{f\,\sqrt {a-b}} \]
- atanh((a + b*tan(e + f*x)^2)^(1/2)/a^(1/2))/(a^(1/2)*f) - atanh((4*a*b^2 *(a + b*tan(e + f*x)^2)^(1/2))/(((2*b^4*f^3)/(a*f^3 - b*f^3) - (2*a*b^3*f^ 3)/(a*f^3 - b*f^3))*(a - b)^(1/2)) - (2*b^3*(a + b*tan(e + f*x)^2)^(1/2))/ (((2*b^4*f^3)/(a*f^3 - b*f^3) - (2*a*b^3*f^3)/(a*f^3 - b*f^3))*(a - b)^(1/ 2)) + (2*(a + b*tan(e + f*x)^2)^(1/2)*(a*f^3 - b*f^3))/(b*f^3*(a - b)^(1/2 )))/(f*(a - b)^(1/2))